const obj = {
  name: 'jack',
  age: 19
}

//[ [ 'name', 'jack' ], [ 'age', 19 ] ]
console.log(Object.entries(obj))

//[ [ '0', 'a' ], [ '1', 'b' ], [ '2', 'c' ] ]
console.log(Object.entries('abc'))

//[ [ '0', 'ab' ], [ '1', 'bc' ], [ '2', 'cd' ] ]
console.log(Object.entries(['ab', 'bc', 'cd']))
